﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;

namespace ConsoleApp5.Models
{
    public class Customers
    {
        public string CustomerID { get; set; }
        public string ContactName { get; set; }
        public string Phone { get; set; }
        public string City { get; set; }
        public string Country { get; set; }
    }

    public class Orders
    {
        public int OrderID { get; set; }
        public string CustomerID { get; set; }
        public DateTime OrderDate { get; set; }
    }

    public class Northwind
    {
        public Query<Customers> Customers { get; set; }
        public Query<Orders> Orders { get; set; }

        public Northwind(DbConnection connection)
        {
            QueryProvider provider = new DbQueryProvider(connection);
            this.Customers = new Query<Customers>(provider);
            this.Orders = new Query<Orders>(provider);
        }
    }
}
